package digui;

import java.util.Scanner;

public class huiwen1 {
    public static void main(String[] args) {
        Huiwenjudgle1 huiwenjudgle1 = new Huiwenjudgle1();
        System.out.println("请输出您需要判断的字符:");
        String str = new Scanner(System.in).next();
        System.out.println("你输入的字符为:"+str);
        String huiwen = huiwenjudgle1.huiwen(str, str.length());
        System.out.println(huiwen);
    }
}
class Huiwenjudgle1 {
    public static String huiwen(String str, int end) {
        String str1="";
       if(end==0){
           return str1;
       }else {
           str1 +=str.charAt(end-1);
           return str1+huiwen(str,end-1);
       }
    }
}
